package com.sz.common.core.system.entity;

import com.sz.common.base.dao.annotation.JudgeEntity;
import com.sz.common.base.dao.annotation.Table;
import com.sz.common.base.dao.annotation.UniqueField;
import com.sz.common.base.entity.EntityBase;


@Table(name = "sys_authorization")
@JudgeEntity(
        fieldOfSelectConditions = {
                @UniqueField({"roleId", "resType", "resId", "permissionId"})
        })
public class Authorization extends EntityBase {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column sys_authorization.Id
     *
     * @mbg.generated Fri Oct 28 17:45:46 CST 2016
     */
    private Integer id;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column sys_authorization.roleId
     *
     * @mbg.generated Fri Oct 28 17:45:46 CST 2016
     */
    private Integer roleId;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column sys_authorization.resType
     *
     * @mbg.generated Fri Oct 28 17:45:46 CST 2016
     */
    private Byte resType;//1代表菜单 2代表资源

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column sys_authorization.resId
     *
     * @mbg.generated Fri Oct 28 17:45:46 CST 2016
     */
    private Integer resId = 0;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column sys_authorization.permissionId
     *
     * @mbg.generated Fri Oct 28 17:45:46 CST 2016
     */
    private Integer permissionId;

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column sys_authorization.Id
     *
     * @return the value of sys_authorization.Id
     * @mbg.generated Fri Oct 28 17:45:46 CST 2016
     */
    public Integer getId() {
        return id;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column sys_authorization.Id
     *
     * @param id the value for sys_authorization.Id
     * @mbg.generated Fri Oct 28 17:45:46 CST 2016
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column sys_authorization.roleId
     *
     * @return the value of sys_authorization.roleId
     * @mbg.generated Fri Oct 28 17:45:46 CST 2016
     */
    public Integer getRoleId() {
        return roleId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column sys_authorization.roleId
     *
     * @param roleId the value for sys_authorization.roleId
     * @mbg.generated Fri Oct 28 17:45:46 CST 2016
     */
    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column sys_authorization.resType
     *
     * @return the value of sys_authorization.resType
     * @mbg.generated Fri Oct 28 17:45:46 CST 2016
     */
    public Byte getResType() {
        return resType;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column sys_authorization.resType
     *
     * @param resType the value for sys_authorization.resType
     * @mbg.generated Fri Oct 28 17:45:46 CST 2016
     */
    public void setResType(Byte resType) {
        this.resType = resType;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column sys_authorization.resId
     *
     * @return the value of sys_authorization.resId
     * @mbg.generated Fri Oct 28 17:45:46 CST 2016
     */
    public Integer getResId() {
        return resId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column sys_authorization.resId
     *
     * @param resId the value for sys_authorization.resId
     * @mbg.generated Fri Oct 28 17:45:46 CST 2016
     */
    public void setResId(Integer resId) {//资源id，这里会存放菜单id
        this.resId = resId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column sys_authorization.permissionId
     *
     * @return the value of sys_authorization.permissionId
     * @mbg.generated Fri Oct 28 17:45:46 CST 2016
     */
    public Integer getPermissionId() {
        return permissionId;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column sys_authorization.permissionId
     *
     * @param permissionId the value for sys_authorization.permissionId
     * @mbg.generated Fri Oct 28 17:45:46 CST 2016
     */
    public void setPermissionId(Integer permissionId) {
        this.permissionId = permissionId;
    }
}